#include "servor.h"

void delay_ms_for_servor(unsigned long num_ms)
{
    mspm0_delay_ms(num_ms);
}


void servor_set_ang( uint8_t ang)
{
    if( ang > 180 ) {
        ang = 180;
    }else if (ang < 0) {
        ang = 0;
    }
    DL_TimerG_setCaptureCompareValue(PWM_0_INST,ang / 180 * 2000 + 500,GPIO_PWM_0_C0_IDX);
    
    // delay_ms_for_servor(500);
}
